package com.antoco.operation.bigscreen.commons.annotation;

import javax.validation.Constraint;
import javax.validation.Payload;

import com.antoco.operation.bigscreen.commons.validator.IsSensorExistValidator;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {IsSensorExistValidator.class})
@Target({ElementType.METHOD,
         ElementType.FIELD,
         ElementType.ANNOTATION_TYPE,
         ElementType.CONSTRUCTOR,
         ElementType.PARAMETER})
public @interface IsSensorExist {

    String message() default "未找到该id的传感器";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
